<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>中国福利彩票</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">

<!--页面样式-->
<link rel="stylesheet" type="text/css" href="css/style.css" />

</head>
<body  style="width:10rem !important; margin:0 auto">
<script>
/*取设备宽度*/
	function rem(){
	var iWidth=document.documentElement.getBoundingClientRect().width;
	iWidth=iWidth>640?640:iWidth;
	document.getElementsByTagName("html")[0].style.fontSize=iWidth/10+"px";
	};
	rem();
	window.onorientationchange=window.onresize=rem      
</script>
<script src="js/jquery-1.7.2.min.js"></script>
    <div class="Header">
<!--     	<div class="left H_logot"><a href="MemberCenter.html"><img src="images/Nimg5.png"></a></div> -->
        <div class="left H_content text-center font28 cfffff">个人资料</div>
        <div class="right H_right text-right font24"><a href="MemberCenter.html"><img src="images/Nimg4.png"></a></div>
        <div class="clear"></div>
    </div>
    
    <div class="MD_xuzhi paddingB60">
    	<div class="MDD_one font24 c333333">
        	<ul>
                 <li class="font28 cf00015 fist" >姓名：<span id="name"></span></li>
                 <li><span class="c999999" >投注账户编号：<span id="accountId"></span></li>
                 <li><span class="c999999" >渠道Id：<span id="channelId"></span></li>
                 <li><span class="c999999" >银行卡号：<span id="bankCard"></span></li>
                 <li style="display: none;"><span class="c999999" >银行卡区域：<span id="bankRegion"></span></li>
                 <li style="display: none;"><span class="c999999" >银行代码123：<span id="swiftCode"></span></li>
                 <li><span class="c999999" >手机号：<span id="mobile"></span></li>
                 <li><span class="c999999" >邮箱：<span id="email"></span></li>
                  <li><span class="c999999" >身份证：<span id="idCard"></span></li>
                  <li><span class="c999999" >性别：<span id="sex"></span></li>
                  <li class="last">
                	<span class="c999999 L_left1 left" >地址：</span><span class="c999999 right L_right1" id="address"></span>
                    <div class="clear"></div>
                </li>
                <li><span class="c999999" >用户身份状态：<span id="status"></span></li>
                <li><span class="c999999" >职业：<span id="job"></span></li>
                <li><span class="c999999" >月收入：<span id="monthIncome"></span></li>
                <li><span class="c999999" >学历：<span id="education"></span></li>
                <li><div class="c999999"  style="float:left;">身份证正面照：</div><img style="float:left" id="idCardPhotoFront"></img></li>
                <li><div class="c999999"  style="float:left;">身份证背面照：</div><img style="float:left" id="idCardPhotoBehind"></img></li>
                <li><span class="c999999" >资金帐户号码：<span id="wagerFundId"></span></li>
            </ul>
        </div>
        
    </div>
</body>
<script type="text/javascript">
var accountId = "";
var channelId = "";
var token = "";
var provinceName="";//地址：省级中文名
var cityName="";//地址：城市中文名
$(document).ready(function() {
	accountId = getCookie("accountId");
	token =  getCookie("token");
	channelId = getCookie("channelId");
	getPersonInfo();
});

//查询个人注册信息
function getPersonInfo(){
	  var para = {
	        };
		
		$.ajax({
			url : "../../api/accountSystem/account/info?accountId="+accountId+"&channelId="+channelId+"&token="+token+"",
			async:false,
			type : "GET",
			herder:{
				'Accept':'application/json',
				'Content-Type':'application/json'
			},
			dataType:"json",
			contentType:"application/json",
			data: JSON.stringify(para),
			error:function(XMLHttpRequest, textStatus, errorThrown){
				alert(errorThrown);
			},
			success: function(data, textStatus){
// 				var data = "{\"accountId\":\"123476\",\"channelId\":\"1234567890\",\"name\":\"周星\",\"sex\":\"1\",\"address\":\"1_1_1_123456789\",\"idCard\":\"210321198905287774\",\"mobile\":\"15940276543\",\"email\":\"838652251@qq.com\",\"bankCardNum\":\"6227888555543336543\",\"bankRegion\":\"1_1\",\"swiftCode\":\"AK\",\"status\":\"1000\",\"job\":\"1\",\"monthincome\":\"1\",\"education\":\"5\",\"idCardPhotoFront\":\"\",\"idCardPhotoBehind\":\"\",\"success\":true,\"wagerFundId\":\"123123123\"}";
// 				data = eval("("+data+")");
				if(data.success == true){
					//姓名赋值
					$('#name').html(hideName(data.name));//姓名赋值
					//性别赋值
					if(data.sex=='1'){
						$('#sex').html("男");
					}else{
						$('#sex').html("女");
					}
					$('#accountId').html(data.accountId);//投注账户编号赋值
					$('#email').html(data.email.split("@")[0].substring(0,3)+"****@"+data.email.split("@")[1]);//邮箱赋值
					//职业赋值
					if(data.job=='1'){
						$('#job').html("专业技术人员（律师，工程师等）");
					}else if(data.job=='2'){
						$('#job').html("政府公务员或事业单位编制人员");
					}else if(data.job=='3'){
						$('#job').html("个体户/私营老板");
					}else if(data.job=='4'){
						$('#job').html("企业中高层管理人员");
					}else if(data.job=='5'){
						$('#job').html("企业办公室职员");
					}else if(data.job=='6'){
						$('#job').html("工人，服务人员等");
					}else if(data.job=='7'){
						$('#job').html("自由职业者");
					}else if(data.job=='8'){
						$('#job').html("其他");
					}
					//月收入赋值
					if(data.monthincome=='1'){
						$('#monthIncome').html("1000元以下");
					}else if(data.monthincome=='2'){
						$('#monthIncome').html("1000-3000元");
					}else if(data.monthincome=='3'){
						$('#monthIncome').html("3000-5000元");
					}else if(data.monthincome=='4'){
						$('#monthIncome').html("5000-10000元");
					}else if(data.monthincome=='5'){
						$('#monthIncome').html("10000-20000元");
					}else if(data.monthincome=='6'){
						$('#monthIncome').html("20000元以上");
					}
					//地址赋值
					getPlaceName(0,data.address.split("_")[0]);
					getPlaceName(data.address.split("_")[0],data.address.split("_")[1]);
					$('#address').html(provinceName+cityName+data.address.split("_")[2]);
					//渠道赋值
					$('#channelId').html(data.channelId);
					//银行卡号赋值
					$('#bankCard').html(data.bankCardNum.substring(0,4)+"*****"+data.bankCardNum.substring(data.bankCardNum.length-4,data.bankCardNum.length));
					//银行卡区域赋值
					$('#bankRegion').html(data.bankRegion);
					//银行卡代码赋值
					$('#swiftCode').html(data.swiftCode);
					//手机号赋值
					$('#mobile').html(data.mobile.substring(0,3)+"***"+data.mobile.substring(data.mobile.length-3,data.mobile.length));
					//身份证赋值
					$('#idCard').html(data.idCard.substring(0,4)+"****"+data.idCard.substring(data.idCard.length-4,data.idCard.length));
					//用户身份状态赋值
					if(data.status==1000){
						$('#status').html("未鉴定身份信息");
					}else if(data.status==1001){
						$('#status').html("身份证手机号已实名验证未验证银行卡");
					}else if(data.status==1002){
						$('#status').html("未完善身份信息");
					}else if(data.status==2000){
						$('#status').html("正常用户");
					}else if(data.status==3000){
						$('#status').html("注销");
					}else if(data.status==4000){
						$('#status').html("冻结");
					}else if(data.status==5000){
						$('#status').html("挂失");
					}
					//学历赋值
					if(data.education==1){
						$('#education').html("高中/中专/中技及以下");
					}else if(data.education==2){
						$('#education').html("大专及同等学历");
					}else if(data.education==3){
						$('#education').html("本科/学士及同等学历");
					}else if(data.education==4){
						$('#education').html("硕士/研究生及同等学历");
					}else if(data.education==5){
						$('#education').html("博士及以上");
					}
					//身份证正面照赋值
					$('#idCardPhotoFront').attr("src",data.idCardPhotoFront);
					//身份证背面照赋值
					$('#idCardPhotoBehind').attr("src",data.idCardPhotoBehind);
					//资金帐户号码赋值
					$('#wagerFundId').html(data.wagerFundId);
					
				}else{
					alert(data.description);
					return;
				}
			}		
		});
  }
  
  
//根据归属地编号获得对应的中文名
function getPlaceName(fatherCode,code){
	$.ajax({
		url : "../../api/accountSystem/para/region?pid="+fatherCode+"",
		async:false,
		type : "GET",
		herder:{
			'Accept':'application/json',
			'Content-Type':'application/json'
		},
		dataType:"json",
		contentType:"application/json",
		error:function(XMLHttpRequest, textStatus, errorThrown){
			alert(errorThrown);
		},
		success: function(data, textStatus){
			for(var i=0;i<data.length;i++){
				if(data[i].id == code){
					if(fatherCode==0){
						provinceName=data[i].regionName;
					}else{
						cityName=data[i].regionName;
					}
				}
			}
		}		
	});
}
</script>
<script src="js/jsCallCookies.js"></script>
<script src="js/SHA256.js"></script>
<script src="js/validation.js"></script>
<script src="js/common.js"></script>
</html>
